package com.hbnu.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hbnu.system.model.entity.User;
import com.hbnu.system.model.entity.Work;
import com.hbnu.system.model.query.WorkPageQuery;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author ${author}
 * @since 2023-05-16
 */
public interface WorkMapper extends BaseMapper<Work> {
    // 校级审核员查询：指定参数名为page、workPageQuery、user
    IPage<Work> schoolGetRelateWorkQuery(
            @Param("page") Page<Work> page,
            @Param("workPageQuery") WorkPageQuery query,
            @Param("user") User user
    );

    // 院级审核员查询：指定参数名为page、workPageQuery、dept
    IPage<Work> collegeGetRelateWorkQuery(
            @Param("page") Page<Work> page,
            @Param("workPageQuery") WorkPageQuery query,
            @Param("user") User user
    );

    // 用户查询：指定参数名为page、workPageQuery、user
    IPage<Work> userGetRelateWorkQuery(
            @Param("page") Page<Work> page,
            @Param("workPageQuery") WorkPageQuery query,
            @Param("user") User user
    );

    IPage<Work> schoolExportRelateWorkQuery(
            @Param("page") Page<Work> page,
            @Param("workPageQuery") WorkPageQuery workPageQuery,
            @Param("user") User user
    );

    IPage<Work> collegeExportRelateWorkQuery(
            @Param("page") Page<Work> page,
            @Param("workPageQuery") WorkPageQuery workPageQuery,
            @Param("user") User user
    );

    IPage<Work> userExportRelateWorkQuery(
            @Param("page") Page<Work> page,
            @Param("workPageQuery") WorkPageQuery workPageQuery,
            @Param("user") User user
    );

}
